package Entity;

import java.sql.Date;
import java.text.SimpleDateFormat;

public class Notice {
    private String notice_Id;
    private String from_Id;
    private String to_Id;
    private String title;
    private String content;
    private Date date;
    private boolean read;

    public String  getDateString() {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        String da= df.format(new java.util.Date());
        return da;
    }

    public boolean isRead() {
		return read;
	}

	public void setRead(boolean read) {
		this.read = read;
	}

	public Date getDate() {
        return date;
    }

    public void setDate() {
        date = new java.sql.Date( new java.util.Date().getTime());
        System.out.println("现在的日期是："+date);
    }

	public String getNotice_Id() {
        return notice_Id;
    }

    public void setNotice_Id(String notice_Id) {
        this.notice_Id = notice_Id;
    }

    public String getFrom_Id() {
        return from_Id;
    }

    public void setFrom_Id(String from_Id) {
        this.from_Id = from_Id;
    }

   

	public String getTo_Id() {
        return to_Id;
    }

    public void setTo_Id(String to_Id) {
        this.to_Id = to_Id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }



	public Notice(String notice_Id, String from_Id, String to_Id, String title, String content, Date date,boolean read) {
		super();
		this.notice_Id = notice_Id;
		this.from_Id = from_Id;
		this.to_Id = to_Id;
		this.title = title;
		this.content = content;
		this.read = read;
		
	}

	@Override
	public String toString() {
		return "Notice [notice_Id=" + notice_Id + ", from_Id=" + from_Id + ", to_Id=" + to_Id + ", title=" + title
				+ ", content=" + content + ", date=" + date + "]";
	}

	public Notice() {
		super();
	}

	

	

}
